package com.ruoyi.delivery.controller;

import com.ruoyi.delivery.domain.DelOutBoundDetail;
import com.ruoyi.delivery.service.IDelOutBoundDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 出库单明细 控制层
 *
 * @author oasis
 */
@RestController
@RequestMapping("/delivery/outBoundDetail")
public class DelOutBoundDetailController {

    @Autowired
    private IDelOutBoundDetailService outBoundDetailService;

    /**
     * 根据 exitRecordId 获取所有出库明细
     * @param exitRecordId 出库编号
     * @return 出库明细列表
     */
    @RequestMapping
    public List<DelOutBoundDetail> getDetailsByExitRecordId(@RequestParam String exitRecordId) {
        System.out.println("getDetailsByExitRecordId: "+exitRecordId);
        return outBoundDetailService.getDetailsByExitRecordId(exitRecordId);
    }
}
